package concurrent;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class AddRemoveListElement {

    public static void main(String[] args) {
        List<String> list = new CopyOnWriteArrayList<>();
        list.add("A");
        list.add("B");

        list.removeIf(s -> s.equals("B"));
    }
}
